package com.zx.mes.hyl.rocket.mq.consume;

import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext;
import org.apache.rocketmq.common.message.MessageExt;

import java.util.List;

/**
 * rocket mq 真正将消息消费的操作
 *
 * @author 华云龙
 * @date 2018-12-11
 */
public interface IConsumeMessage {

    /**
     * 消费成功返回true,失败返回false
     *
     * @param msg 消息体
     * @param context rocket mq 上下文
     * @return boolean
     */
    boolean consumeMessage(final List<MessageExt> msg, final ConsumeConcurrentlyContext context);
}
